<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>柔光日记 - 注册</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-light: #FFF0F5;
            --primary: #FFD1DC;
            --primary-dark: #F8C8DC;
            --secondary: #E0F7FA;
            --accent: #B2EBF2;
            --text: #5D4037;
            --light: #FFF9FB;
            --gray: #F5F5F5;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        
        .auth-container {
            background-color: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            padding: 40px;
        }
        
        .auth-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .auth-header h2 {
            font-size: 1.8rem;
            color: var(--primary-dark);
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .form-control {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 30px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(255, 209, 220, 0.3);
        }
        
        .form-actions {
            margin-top: 30px;
        }
        
        .btn {
            padding: 12px 20px;
            border-radius: 30px;
            border: none;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            font-size: 1rem;
            width: 100%;
            justify-content: center;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            box-shadow: 0 4px 10px rgba(255, 209, 220, 0.5);
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(255, 209, 220, 0.7);
        }
        
        .form-footer {
            text-align: center;
            margin-top: 20px;
            color: #888;
        }
        
        .form-footer a {
            color: var(--primary-dark);
            text-decoration: none;
            font-weight: 500;
        }
    </style>
</head>
<body>
    <div class="auth-container">
        <div class="auth-header">
            <h2>柔光日记</h2>
            <p>创建您的账号开始记录</p>
        </div>
        
        <form id="registerForm">
            <div class="form-group">
                <label for="registerUsername">账号</label>
                <input type="text" id="registerUsername" class="form-control" placeholder="请设置您的账号" required>
            </div>
            <div class="form-group">
                <label for="registerPassword">密码</label>
                <input type="password" id="registerPassword" class="form-control" placeholder="请设置密码（至少6位）" required>
            </div>
            <div class="form-group">
                <label for="registerConfirmPassword">确认密码</label>
                <input type="password" id="registerConfirmPassword" class="form-control" placeholder="请再次输入密码" required>
            </div>
            <div class="form-actions">
                <button type="submit" class="btn btn-primary">
                    <i class="fas fa-user-plus"></i> 注册
                </button>
            </div>
            <div class="form-footer">
                <p>已有账号？ <a href="login.html">立即登录</a></p>
            </div>
        </form>
    </div>

    <script>
        document.getElementById('registerForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            const username = document.getElementById('registerUsername').value;
            const password = document.getElementById('registerPassword').value;
            const confirmPassword = document.getElementById('registerConfirmPassword').value;
            
            if (!username || !password) {
                alert('请填写账号和密码');
                return;
            }
            
            if (password.length < 6) {
                alert('密码长度至少为6位');
                return;
            }
            
            if (password !== confirmPassword) {
                alert('两次输入的密码不一致');
                return;
            }
            
            // 模拟注册成功
            alert(`注册成功，账号：${username}`);
            
            // 跳转到登录页面
            window.location.href = 'login.html';
        });
    </script>
</body>
</html>    